package com.yedean.factory.config;

import com.yedean.factory.property.PropertyValues;
import lombok.Data;

/**
 * BeanDefinition bean定义
 *
 * @author yedean
 * @date 2022/6/28
 */

@Data
public class BeanDefinition {

    private Class<?> beanClass;

    private PropertyValues propertyValues;
    
    private String initMethodName;
    
    private String destroyMethodName;
    
    


    public BeanDefinition(Class<?> beanClass) {
        this.beanClass = beanClass;
        this.propertyValues=new PropertyValues();
    }

    public BeanDefinition(Class<?> beanClass, PropertyValues propertyValues) {
        this.beanClass = beanClass;
        this.propertyValues = propertyValues != null ? propertyValues : new PropertyValues();
    }

    public String getInitMethodName() { 
        return initMethodName;
    }

    public void setInitMethodName(String initMethodName) {
        this.initMethodName = initMethodName;
    }

    public String getDestroyMethodName() {
        return destroyMethodName;
    }

    public void setDestroyMethodName(String destroyMethodName) {
        this.destroyMethodName = destroyMethodName;
    }
}
